<?php
/**
 * 测试方法
 * User: Sanit
 * Date: 2017/3/6
 * Time: 23:35
 */

$test = new TestValidator();
$data = [
    'username' => 'test_test',
    'password' => 'password'
];
$rules = [
    'username' => 'required|min:5',
    'password' => 'confirmed',
];
$errors = [
    'require' => '字段 :attribute 不能为空 '
];
$test->test($data,$rules,$errors);